/*
 * Copyright (C) 2013 Daniel Wasilew <daniel.wasilew@codeminer.org>
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package org.codeminer.parts.specification.source;

import de.wusel.picotask.xml.element.XMLElement;
import org.codeminer.parts.specification.general.FilePart;

import java.io.PrintWriter;
import java.util.Calendar;


/**
 *
 * @author Daniel Wasilew <daniel.wasilew@codeminer.org>
 */
final class CommentPart implements FilePart {

    @Override
    public void writeTo(PrintWriter writer, XMLElement parsedElement) {
        writer.println("/*");
        writer.print(" * Copyright (C) ");
        writer.print(Calendar.getInstance().get(Calendar.YEAR));
        writer.println(" Daniel Wasilew <daniel.wasilew@codeminer.org>");
        writer.println(" *");
        writer.println(" * This program is free software: you can redistribute it and/or modify");
        writer.println(" * it under the terms of the GNU General Public License as published by");
        writer.println(" * the Free Software Foundation, either version 3 of the License, or");
        writer.println(" * (at your option) any later version.");
        writer.println(" *");
        writer.println(" * This program is distributed in the hope that it will be useful,");
        writer.println(" * but WITHOUT ANY WARRANTY; without even the implied warranty of");
        writer.println(" * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the");
        writer.println(" * GNU General Public License for more details.");
        writer.println(" *");
        writer.println(" * You should have received a copy of the GNU General Public License");
        writer.println(" * along with this program.  If not, see <http://www.gnu.org/licenses/>.");
        writer.println(" */");
    }
}
